using System;
using System.ComponentModel.DataAnnotations.Schema;
using ESoft.Core.Data;
using ESoft.Core.Data.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Edu.Web.Data.Entity
{
    /// <summary>
    /// Notice
    /// </summary>    
	[Table("notice")]
    public partial class NoticeEntity : BaseModel<long>
    {		    
        /// <summary>
        /// 标题
        /// </summary>
		[Column("title")]
        public string Title { get; set; }
    
        /// <summary>
        /// 内容
        /// </summary>
		[Column("content")]
        public string Content { get; set; }
    
        /// <summary>
        /// 1普通信息、2课程信息
        /// </summary>
		[Column("notice_type")]
        public int? NoticeType { get; set; }
    
        /// <summary>
        /// 创建时间
        /// </summary>
		[Column("create_time")]
        public DateTime? CreateTime { get; set; }
    
        /// <summary>
        /// 创建人
        /// </summary>
		[Column("create_user_id")]
        public long? CreateUserId { get; set; }
    
        /// <summary>
        /// 课程ID
        /// </summary>
		[Column("cource_id")]
        public long? CourceId { get; set; }
    }

    public class PersonConfiguration : EntityMappingConfiguration<NoticeEntity>
    {
        public override void Map(EntityTypeBuilder<NoticeEntity> b)
        {
            //b.ToTable("Person", "HumanResources")
            //    .HasKey(p => p.PersonID);

            //b.Property(p => p.FirstName).HasMaxLength(50).IsRequired();
            //b.Property(p => p.MiddleName).HasMaxLength(50);
            //b.Property(p => p.LastName).HasMaxLength(50).IsRequired();
        }
    }
}

